home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / misc / edu / Verbes1_4.lha / Install_Verbes next >
Text File  |  1995-03-28  |  5KB  |  262 lines

  1. ; Installer script for Ensemble Verbes (unregistered)
  2. ; $VER: Install_Verbes 1.6 (28.3.95)
  3. ; Changes from V1.5
  4. ;    Removed some commented debugging code
  5. ;    Installs new catalog files
  6. ; Changes from V1.4
  7. ;    Installs catalog files
  8. ; Changes from V1.3
  9. ;    Separated shareware install script from registered one
  10. ;        (mostly removed code to install AmigaGuide and
  11. ;        amigaguide.library)
  12. ; Changes from V1.2
  13. ;    Installs separate .guide files for V37, V39+
  14. ; Changes from V1.1
  15. ;    Removed "force user level" code--now uses MINUSER tooltype
  16. ;    Started on installation of separate .guide files for V37, V39+
  17. ; Changes from V1.0
  18. ;    Fixed explicit reference to "Programs:"
  19.  
  20. ;=============================================================================
  21. ; procedure to copy the language drivers and catalogs (from V39 Install)
  22.  
  23. (procedure DOLOCALE
  24. (
  25.     (set n 0)
  26.     (while
  27.         (set language
  28.             (select n ;"dansk"
  29.                   ;"deutsch"
  30.                   "english"
  31.                   "español"
  32.                   "français"
  33.                   ;"italiano"
  34.                   ;"nederlands"
  35.                   "norsk"
  36.                   ;"português"
  37.                   ;"svenska"
  38.                   ""
  39.             )
  40.         )
  41.         (
  42.             (set catpath
  43.                 (tackon "Catalogs" language)
  44.             )
  45.             (if (in lang n)
  46.                 (
  47.                     (if (<> 0 n) ; skip "english"
  48.                         (
  49.                             (makedir
  50.                                 (tackon newdest "Catalogs")
  51.                                 (safe)
  52.                             )
  53.                             (makedir
  54.                                 (tackon newdest catpath)
  55.                                 (safe)
  56.                             )
  57.                             (if (= 2 n) ; handle 2 cases for français
  58.                                 (
  59.                                     (set langopt
  60.                                         (askbool
  61.                                             (prompt "Choose the desired version of the français catalog file")
  62.                                             (choices "French with English" "French only")
  63.                                             (help "You may choose either:\n"
  64.                                                   "  French with English menus and error messages, or\n"
  65.                                                   "  Entirely French"
  66.                                             )
  67.                                         )
  68.                                     )
  69.                                     (if (= 1 langopt) ; French with English
  70.                                         (set srcpath
  71.                                             (tackon "Catalogs" "français2")
  72.                                         )
  73.                                     )
  74.                                 )
  75.                             )
  76.                             (copyfiles
  77.                                 (source
  78.                                     (tackon @execute-dir catpath)
  79.                                 )
  80.                                 (dest
  81.                                     (tackon newdest catpath)
  82.                                 )
  83.                                 (all)
  84.                             )
  85.                         )
  86.                     )
  87.                 )
  88.             )
  89.             (set n (+ n 1))
  90.         )
  91.     )
  92. ))
  93.  
  94. ; Find OS version number
  95. (set osver
  96.     (/
  97.         (getversion "exec.library"
  98.             (resident)
  99.         )
  100.         65536
  101.     )
  102. )
  103.  
  104. ; Is user running 3.0 or above?
  105. (set ks3
  106.     (> osver 38)
  107. )
  108.  
  109. ; Is user running 2.0 or above?  If not, Verbes won't work, so abort.
  110. (if
  111.     (< osver 37)
  112.     (
  113.         (message "Ensemble Verbes requires Release 2 or higher.  "
  114.                  "Exiting..."
  115.         )
  116.         (transcript "Error: Ensemble Verbes requires Release 2 or higher.")
  117.         (exit
  118.             (quiet)
  119.         )
  120.     )
  121.     (if ks3
  122.         (message "Installing for Release 3 and above")
  123.         (message "Installing for Release 2.x")
  124.     )
  125. )
  126.  
  127. ; Is Verbes there?  If not, user is not running from the Verbes dir,
  128. ; so abort.
  129. (if
  130.     (not
  131.         (exists
  132.             (tackon @execute-dir "Verbes")
  133.         )
  134.     )
  135.     (
  136.         (message "Please run the installation program from the "
  137.                  "Ensemble Verbes directory.  Exiting..."
  138.         )
  139.         (transcript "Error: Installer must be run from the directory "
  140.                     "containing the Ensemble Verbes installation script.")
  141.         (exit
  142.             (quiet)
  143.         )
  144.     )
  145. )
  146.  
  147. (set vernum
  148.     (getversion "Verbes")
  149. )
  150. (set thisver
  151.     (/ vernum 65536)
  152. )
  153. (set thisrev
  154.     (- vernum
  155.         (* thisver 65536)
  156.     )
  157. )
  158.  
  159. (set newdest
  160.     (askdir
  161.         (prompt "Choose a location for \"Ensemble Verbes\"")
  162.         (help @askdir-help)
  163.         (default @default-dest)
  164.         (newpath)
  165.     )
  166. )
  167.  
  168. (set @default-dest newdest)
  169.  
  170. (set vernum
  171.     (getversion
  172.         (tackon newdest "Verbes")
  173.     )
  174. )
  175. (set ver
  176.     (/ vernum 65536)
  177. )
  178. (set rev
  179.     (- vernum
  180.         (* ver 65536)
  181.     )
  182. )
  183.  
  184. (if
  185.     (or
  186.         (> thisver ver)
  187.         (and
  188.             (= thisver ver)
  189.             (> thisrev rev)
  190.         )
  191.     )
  192.     (
  193.         (if
  194.             (> thisver 0)
  195.             (
  196.                 (transcript "Replacing \"Ensemble Verbes\" V" ver "." rev " with V" thisver "." thisrev)
  197.             )
  198.         )
  199.         (copyfiles
  200.             (prompt
  201.                 (cat "About to install \"Ensemble Verbes\" V" thisver "." thisrev " in " newdest)
  202.             )
  203.             (help @copyfiles-help)
  204.             (source
  205.                 (tackon @execute-dir "Verbes")
  206.             )
  207.             (dest newdest)
  208.             (infos)
  209.         )
  210.         (tooltype
  211.             (dest
  212.                 (tackon newdest "Verbes")
  213.             )
  214.             (noposition)
  215.         )
  216.         (set lang
  217.             (askoptions
  218.                 (prompt "Which languages should be installed?")
  219.                 (help "Language help")
  220.                 (choices "English" "Español" "Français" "Norsk")
  221.                 (default 15)
  222.             )
  223.         )
  224.         (DOLOCALE)
  225.         (copyfiles
  226.             (prompt
  227.                 (cat "About to install \"Verbes.guide\" in " newdest)
  228.             )
  229.             (help @copyfiles-help)
  230.             (source
  231.                 (tackon @execute-dir "Verbes.guide")
  232.             )
  233.             (dest newdest)
  234.             (newname "Verbes.guide")
  235.             (infos)
  236.         )
  237.  
  238.         ; Set Verbes.guide.info's default tool to "AmigaGuide" for <3.0 systems;
  239.         ; "MultiView" for >=3.0
  240.         (if ks3
  241.             (
  242.                 (tooltype
  243.                     (dest
  244.                         (tackon newdest "Verbes.guide")
  245.                     )
  246.                     (noposition)
  247.                     (setdefaulttool "MultiView")
  248.                 )
  249.             )
  250.             (
  251.                 (tooltype
  252.                     (dest
  253.                         (tackon newdest "Verbes.guide")
  254.                     )
  255.                     (noposition)
  256.                     (setdefaulttool "AmigaGuide")
  257.                 )
  258.             )
  259.         )
  260.     )
  261. )
  262.